package com.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author 贺瑞杰
 * @version V1.0
 * @date 2018-07-16 1:06
 * @description
 */
@RestController
public class TestController {

    @Autowired
    private RestTemplate restTemplate;

    @RequestMapping("/output")
    public String output(String name) {
        return restTemplate.getForEntity("http://CONSUMER-CLIENT/output?name=" + name, String.class).getBody();
    }

}

